import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PageForm, ProductPageResult } from './types';



/**
 * 获取商品列表
 *
 * @param PageForm
 */
export function goodsList(
  PageForm?: PageForm
): AxiosPromise<ProductPageResult> {
  return request({
    url: '/api/Goods/goodsList',
    method: 'get',
    params: PageForm
  });
}
/**
 * 获取商品品牌
 */
export function brandList(): AxiosPromise<any> {
  return request({
    url: '/api/Goods/brandList',
    method: 'get'
  });
}
/**
 * 获取商品删除
 */
export function onDelete(data:any): AxiosPromise<any> {
  return request({
    url: '/api/Goods/onDelete',
    method: 'post',
    data
  });
}

/**
 * 获取商品品牌
 */
export function categoryList(): AxiosPromise<any> {
  return request({
    url: '/api/Goods/categoryList',
    method: 'get'
  });
}

